<template>
	<view>
		<u-list @scrolltolower="scrolltolower" @scrolltoupper="scrolltoupper">
			<u-list-item v-for="(item, index) in indexList" :key="index">
				<view class="item">{{index}}</view>
			</u-list-item>
		</u-list>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				indexList: []
			}
		},
		onLoad() {
			this.loadmore()
		},
		methods: {
			scrolltoupper() {
				console.log("=========up==========")
			},
			scrolltolower() {
				console.log("==========down=========")
				this.loadmore()
			},
			loadmore() {
				for (let i = 0; i < 30; i++) {
					this.indexList.push(i)
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
.item {
	width: 100%;
	height: 300rpx;
}
</style>
